import hashlib

# MD5加密方法
def md5(input_string):
    return hashlib.md5(input_string.encode('utf-8')).hexdigest()

# MD5加盐加密方法
def md5_with_salt(input_string, salt):
    return md5(input_string + salt)

# MD5多次加密
def md5_multiple_times(input_string, times):
    result = input_string
    for _ in range(times):
        result = md5(result)
    return result

# 测试
input_string = "hello"
salt = "randomSalt"

print("MD5:", md5(input_string))
print("MD5 with Salt:", md5_with_salt(input_string, salt))
print("MD5 Multiple Times:", md5_multiple_times(input_string, 3))
